package com.example.compose.utils

import com.example.compose.App

val Int.cx: Float
    get() {
        var scale = 1f
        App().getContext().resources.displayMetrics.apply {
            scale = widthPixels / density / 360
        }
        return this * scale
    }

val Int.toDp: Float
    get() {
        var scale = 1f
        App().getContext().resources.displayMetrics.apply {
            scale = density
        }
        return this / scale
    }

val Int.dip: Float
    get() {
        var scale: Float
        App().getContext().resources.displayMetrics.apply {
            scale = density
        }
        return this / scale
    }